package com.ymttest.database.sqlwapper.godmch;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.cs_info;
import com.ymttest.database.model.cs_infoKey;
import com.ymttest.utils.EnvSetup;
/************************************************************************************
 * @Author : 吴文
 * @Date : 
 * @Copyright : 洋码头
 *godmach
 ************************************************************************************/
public class cs_infoWapper {
	SqlManager manage;
	public cs_infoWapper() {
		manage = new SqlManager("mysqlgodmchdb" + EnvSetup.getEnv());
		 
	}
	public  cs_info selectByPrimaryKey(cs_infoKey key) throws InterruptedException {
		cs_info  model=new cs_info();
		List<cs_info> list = (List<cs_info>) manage.getSelectResults("com.ymttest.database.mapping.godmch.cs_infoMapper.selectByPrimaryKey",key);
		if(list.size()>0)
			  model=list.get(0);
		manage.commit();
		return model;
	}
	public  cs_info selectBycsId(cs_infoKey key) throws InterruptedException {
		cs_info  model=new cs_info();
		List<cs_info> list = (List<cs_info>) manage.getSelectResults("com.ymttest.database.mapping.godmch.cs_infoMapper.selectBycsId",key);
		if(list.size()>0)
			  model=list.get(0);
		manage.commit();
		return model;
	}
	
	
	public  Integer updateByPrimaryKey(cs_info record) throws InterruptedException {

		Integer result=  manage.update("com.ymttest.database.mapping.godmch.cs_infoMapper.updateByPrimaryKey",record);

		manage.commit();
		return result;
	}
	
	
	public static void main(String args[]) throws InterruptedException {
		cs_infoWapper c=new cs_infoWapper();
		cs_infoKey k=new cs_infoKey();
		k.setCsId(500097197);
		cs_info cs=c.selectBycsId(k);
		System.out.print("okj");
	}
}
